package com.nchu.controller;

import com.nchu.common.util.R;
import com.nchu.service.IClassesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/classes")
@CrossOrigin
public class ClassesController {
    @Autowired
    private IClassesService classesService;
    @GetMapping("/list")
    public R list(){
        return R.ok().data("list",classesService.list());
    }
}
